home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
util
/
EvenBetterBusError.sit
/
EvenBetterBusError
/
EvenBetterBusError Readme
< prev
next >
Wrap
Text File
|
1994-12-19
|
2KB
|
24 lines
EvenBetterBusError - a system extension to help catch renegade references to NIL...
Many of you have heard of Mr. BusError, a system extension designed to help catch programs that
de-reference NIL (thinking it might be a valid handle...). Mr. BusError periodically writes a value
to location zero which, if dereferenced, will cause a bus error or address error. Actually, though,
the value which Mr. BusError stuffs into location zero will only cause bus errors on machines
running in 24-bit mode. It doesn't cause a bus error in 32-bit mode.
So, along comes BetterBusError. It does pretty much the same thing Mr. BusError does, except
for two things. First, the value it stuffs into location zero is a "bad" address in 32-bit
mode as well as 24-bit mode. Second, it also checks to see if anyone has written data to location
zero (another common programming mistake). So far, so good...
Well, unfortunately, the memory manager in the 32-bit clean ROMs has a bug which causes it to
write to location zero every time SetPtrSize is called while running in 24-bit mode. This causes
BetterBusError to break into the debugger shouting “Write to NIL!”. Actually, it's only the
“high” bit of the long at location zero which is changed (the memory manager is “locking” the
“handle” (which isn’t there...).
EvenBetterBusError (EBBE) to the rescue! EBBE does everything the other two extensions do,
and also knows to ignore the high bit at zero since the memory manager will change it...
Enjoy.
Greg Marriott